package com.du.stutestsys.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.du.stutestsys.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface ClassMagMapper extends BaseMapper<ClassMag> {
    //增加班级
    Integer addClassMag(ClassMag classMag);

    //更新老师表
    Integer addClassTeacher(@Param("classTeachers") List<ClassMag> classTeachers);


    Integer updateClassGrade();

    Integer updateUserTeacher(@Param("classMag") ClassMag classMag);
    Integer updateClassMag(ClassMag classMag);
    Integer updateClassTeacher(@Param("teachers") Map<SysUser,SysUser> teachers);

    List<ClassMag> selectClassMag(ClassMag classMag);
    //解除老师和班级的关联
    Integer relieveClass(@Param("ids") List<Long> ids);

}
